package com.mgq.juc.design.guard.v2;

import lombok.extern.slf4j.Slf4j;

/**
 * @author MaGuangQi
 * 收信人 类,1个收信人对应一个PostMan
 * @date 2021-12-16 10:39
 **/
@Slf4j
public class People  extends Thread{

    @Override
    public void run() {
        log.debug("开始接收信息");
        GuardedObject mail = MailBoxes.createGuardObject();
        Object o = mail.get(2000);
        log.debug("收到信件,id:{},内容:{}",mail.getId(),o);
    }
}
